/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.tnmk.worktime.service.filter;

import org.tnmk.common.util.Filter;
import org.joda.time.DateTime;
import org.tnmk.worktime.utils.TimePeriodUtils;

/**
 *
 * @author tnmkhoi
 */
public final class ThisWeekTimeFilter implements Filter<DateTime>{
  private static final ThisWeekTimeFilter INSTANCE = new ThisWeekTimeFilter();
  private ThisWeekTimeFilter(){}
  public static ThisWeekTimeFilter getInstance(){
    return INSTANCE;
  }
  public boolean accept(DateTime model) {
    boolean rs = false;
    if (model == null) return rs;
    rs = TimePeriodUtils.isInThisWeek(model);
    return rs;
  }
}
